#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int a[] = {1, 2, 2, 2, 2, 3, 5, 7, 7, 9, 10};
    int n = sizeof(a) / sizeof(a[0]);
    int k = 2;
    cout << lower_bound(a, a + n, k) - a << endl;//lgN
    cout << upper_bound(a, a + n, k) - a << endl;
    return 0;
}
